#ifndef STORAGE_DB_STORAGE_CMD_HPP
#define STORAGE_DB_STORAGE_CMD_HPP

#include "Storage/CommonStorageConfig.hpp"
#include "Storage/StorageCommand.hpp"

namespace CaseDB { class Connection; }

namespace Storage
{

/// \ingroup Storage
///	\brief It specializes the generic storage command to work with databases.
///
/// It requires a valid, open database connection to work with.
class DbStorageCmd: public Storage::StorageCommand
{
public:
	/// \brief It initializes the command.
	/// \param rSubject the case entity to be stored.
	/// \param type the type of the operation.
	/// \param dbConnection the opened database connection to be used for execution.
	DbStorageCmd( Model::CaseEntity& rSubject, Storage::StorageCommand::Type type, CaseDB::Connection& dbConnection);

protected:
	CaseDB::Connection& dbConnection_;

private:
	DbStorageCmd& operator=( const DbStorageCmd&);
};

} // namespace Storage


#endif // STORAGE_DB_STORAGE_CMD_HPP
